package com.hongyue.ziXI;

import java.util.Scanner;

public class Demo03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        //String scrStr = sc.nextLine();
        String scrStr = "java woaijava,i like jajavava i enjoy java";
        System.out.println("请输入要删除的元素");
        //String delStr = sc.nextLine();
        String delStr = "java";
        int i = 0;
        int j = 0;
        while (i >= scrStr.length()) {
            i = scrStr.indexOf(delStr);
            j++;
        }
        System.out.println("j = " + j);
        String replace = scrStr.replace(delStr, "");
        String aaa = replace.replace(delStr, "");
    }
}
